function dep_matrix = depmat(N,stations);
    station1 = stations(:,1);
    station2 = stations(:,2);
    
dep_matrix = zeros(N,N);

for i = 1:N 
        for j = 1:N
            if station1(i) == station1(j)
                dep_matrix(i,j) = 1;
            end;
            if station1(i) == station2(j) && station2(i) ~= -9
                dep_matrix(i,j) = 1;
            end;
            if station2(i) == station2(j) && station2(i) ~= -9
                dep_matrix(i,j) = 1;
            end;            
        end;
end;

clear i j;